package ru.amse.tsyganov.jumleditor.view;

import org.eclipse.swt.graphics.GC;

import ru.amse.tsyganov.jumleditor.model.ActivityGraph;
import ru.amse.tsyganov.jumleditor.model.SubactivityState;

public class SubactivityStateView<T extends SubactivityState> 
	extends StateView<T> {
	
	public SubactivityStateView(T model, 
			ActivityGraphView<? extends ActivityGraph> activityGraphView) {
		
		super(model, activityGraphView);
	}
	
	@Override
	public void prepaintEvent(GC gc) {
	}
	
	@Override
	public void paintFigure(GC gc) {
		assert gc != null;
		
		gc.setBackground(Colors.getLightRedColor());
		gc.fillRectangle(getRectangle());
		
		gc.setForeground(getValidity().getColor());
		gc.drawRectangle(getRectangle());
	}
	
}
